﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace UtilsLib.UtilsMath
{
    public static class IntHelper
    {
        /// <summary>
        /// Tells if a number is inside the specified limits
        /// </summary>
        /// <param name="number">Le nombre a comparer</param>
        /// <param name="min"> The min limit of the comparison</param>
        /// <param name="max"> The max limit for the comparison</param>
        /// <param name="include"></param>
        /// <returns> True if the number is within the limits</returns>
        public static bool isBetween(int number, int min, int max, bool include)
        {
            if(include)
                return (number >= min) && (number <= max);
            else
                return (number > min) && (number < max);
        }
    }
}
